

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Create CallDetail</title>         
    </head>
    <body>
        <g:render template="/menu" />
        <div class="body">
            <h1>Create CallDetail</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${callDetailInstance}">
            <div class="errors">
                <g:renderErrors bean="${callDetailInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" method="post" >
                <input type="hidden" name="user.id" value="${session.user?.id}" />

                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="startTime">Start Time:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:callDetailInstance,field:'startTime','errors')}">
                                    <g:datePicker name="startTime" value="${callDetailInstance?.startTime}" precision="minute" ></g:datePicker>
                                </td>
                            </tr>

                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="duration">Duration:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:callDetailInstance,field:'duration','errors')}">
                                    <input type="text" id="duration" name="duration" value="${fieldValue(bean:callDetailInstance,field:'duration')}" />
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="name">Name:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:callDetailInstance,field:'name','errors')}">
                                    <input type="text" id="name" name="name" value="${fieldValue(bean:callDetailInstance,field:'name')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="details">Details:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:callDetailInstance,field:'details','errors')}">
                                    <input type="text" id="details" name="details" value="${fieldValue(bean:callDetailInstance,field:'details')}"/>
                                </td>
                            </tr>

                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="callBack">Call Back:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:callDetailInstance,field:'callBack','errors')}">
                                    <g:checkBox name="callBack" value="${callDetailInstance?.callBack}" ></g:checkBox>
                                </td>
                            </tr>

                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="callBackTime">Call Back Time:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:callDetailInstance,field:'callBackTime','errors')}">
                                    <g:datePicker name="callBackTime" value="${callDetailInstance?.callBackTime}" precision="minute" ></g:datePicker>
                                </td>
                            </tr>

                            <!--
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="user">User:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:callDetailInstance,field:'user','errors')}">
                                    <g:select 
                                              name="user.id"
                                              from="${User.list()}"
                                              optionKey="id"
                                              optionValue="userName"
                                              ></g:select>
                                </td>
                            </tr>
                            -->
                            
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><input class="save" type="submit" value="Create" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
